<div class="content-box"><!-- Start Content Box -->				
	<div class="content-box-header">					
		<h3>Users Management</h3>					
		<ul class="content-box-tabs">
			<li><a href="#tab1" class="default-tab">Users List</a></li> <!-- href must be unique and match the id of target div -->
			<li><a href="#tab2">Add new user</a></li>
		</ul>					
		<div class="clear"></div>					
	</div> <!-- End .content-box-header -->				
	<div class="content-box-content">
		<div class="tab-content default-tab" id="tab1">				
			<table>							
				<thead>
					<tr>
					   <th><input class="check-all" type="checkbox" /></th>
					   <th>Username</th>
					   <th>Email</th>		
					   <th>Action</th>			   
					</tr>
					
				</thead>
			 
				<tfoot>
					<tr>
						<td colspan="6">
							<div class="bulk-actions align-left">
								<select name="dropdown">
									<option value="option1">Choose an action...</option>
									<option value="option2">Edit</option>
									<option value="option3">Delete</option>
								</select>
								<a class="button" href="#">Apply to selected</a>                
							</div>
							
							<!-- PAGER -->
							<?php HDataPager::render('portal_users',PAGE_SIZE, $this->page, 'Users');?>
							<div class="clear"></div>
						</td>
					</tr>
				</tfoot>
			 
				<tbody>
				<?php 
				for ($i = 0; $i < count($this->data); $i++) {
				?>
					<tr>
						<td><input type="checkbox" /></td>
						<td><?php echo $this->data[$i]['username'];?></td>
						<td><?php echo $this->data[$i]['email']?></td>						
						<td>
							<!-- Icons -->
							 <a href="<?php echo HCommon::navigateUrl('UsersEdit',array('id'=>$this->data[$i]['id']));?>" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a>
							 <a href="<?php echo HCommon::navigateUrl('UsersDelete', array('id'=>$this->data[$i]['id']));?>" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> 
						</td>
					</tr>														
				<?php
				}
				?>
				</tbody>
				
			</table>			
		</div>

		<div class="tab-content" id="tab2">	
			<h3>Add new module</h3>			
			<form action="<?php echo HCommon::PHPSELF();?>" method="post" onsubmit="return validateForm()">						
				<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->							
					<p>
						<label>Username</label>
						<input class="text-input small-input" type="text" id="tbxUsername" name="tbxUsername" onkeypress="required_field('tbxUsername')" onkeydown="required_field('tbxUsername')"/> 
						<span class="input-notification success png_bg" id="tbxUsernameTrue"></span> 
						<span class="input-notification error png_bg" id="tbxUsernameFalse"></span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<small>Put username here</small>
					</p>
					<p>
						<label>Password</label>
						<input class="text-input small-input" type="password" id="tbxPassword" name="tbxPassword" onkeypress="required_field('tbxPassword')" onkeydown="required_field('tbxPassword')"/> 
						<span class="input-notification success png_bg" id="tbxPasswordTrue"></span> 
						<span class="input-notification error png_bg" id="tbxPasswordFalse"></span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<small>Put password here</small>
					</p>	
					<p>
						<label>Email</label>
						<input class="text-input small-input" type="" id="tbxEmail" name="tbxEmail" onkeypress="required_field('tbxEmail')" onkeydown="required_field('tbxEmail')"/> 
						<span class="input-notification success png_bg" id="tbxEmailTrue"></span> 
						<span class="input-notification error png_bg" id="tbxEmailFalse"></span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<small>Put email here</small>
					</p>					
					
					<p>
						<input class="button" type="submit" value="Submit" />
					</p>
					
				</fieldset>
				
				<div class="clear"></div><!-- End .clear -->
				<input type="hidden" name="flag" value="-1" />
			</form>		
		</div>		
	</div>
</div>

<script>
function validateForm() {
	if (!required_field('tbxName')||!required_field('tbxPassword')||!required_field('tbxEmail')) return false;	
	return true;
}
</script>